package com.ives.launcher.view;

import com.ives.launcher.logic.DragContainer;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

/**
 * 主界面的底部菜单
 * 既可以接受拖来的item，也可以将自身包含的item拖出去，所以实现了DragContainerSource
 * 此容器固定布，只能容纳一行item，数量为<5个
 * 
 * 和DragContainerTarget
 * @author ives
 *
 */
public class View_Menu_Bottom extends View_Page_Item{

	public View_Menu_Bottom(Context context) {
		super(context);
	}

	public View_Menu_Bottom(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public View_Menu_Bottom(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public View_Menu_Bottom(Context context, int width, int height) {
		super(context, width, height);
	}

	@Override
	public void addView(View child, android.view.ViewGroup.LayoutParams params) {
		((View_Cell)child).setDrawTitle(false);
		//强制控制cell样式
		
		super.addView(child, params);
	}

	@Override
	public void onDropOut(View view, DragContainer target) {
		((View_Drag)view).getStartCell().setDrawTitle(true);
		super.onDropOut(view, target);
	}

	@Override
	public void onDragIn(View view, DragContainer source) {
		((View_Drag)view).getStartCell().setDrawTitle(false);
		super.onDragIn(view, source);
	}
	
	

}
